/****************************************************************************** * Copyright (C) Ultraleap, Inc. 2011-2021. * * * * Use subject to the terms of the Apache License 2.0 available at * * http://www.apache.org/licenses/LICENSE-2.0, or another agreement * * between Ultraleap and you, your company or other organization. * ******************************************************************************/ using Leap.Unity; using System.Collections; using System.Collections.Generic; using UnityEditor; using UnityEngine; namespace Leap.Unity.Interaction { [CanEditMultipleObjects] [CustomEditor(typeof(Anchor))] public class AnchorEditor : CustomEditorBase { protected override void OnEnable() { base.OnEnable(); deferProperty("_eventTable"); specifyCustomDrawer("_eventTable", drawEventTable); } private EnumEventTableEditor _tableEditor; private void drawEventTable(SerializedProperty property) { if (_tableEditor == null) { _tableEditor = new EnumEventTableEditor(property, typeof(Anchor.EventType)); } _tableEditor.DoGuiLayout(); } } }